<?
error_reporting(E_ALL^E_NOTICE);

include_once dirname(__FILE__)."/config.php";

include_once "$ssincdir/inc2.php";
inc_inclib("db_mysql.php");
$db = &new db_mysql($db_host,$db_user,$db_passwd,$db_name);

session_start();

inc_inclib("permission.php");

//NOTE: since we are using the inc login module, we can use this...
//needed because register globals is off in our standard .htaccess file
$user = $_SESSION["user"];

function fusedie($reason)
	{
	echo "<hr><h1>Ooops! $reason</h1>";
	echo "<p>Please report this error to the webmaster.</p>";

	$cs = array("function","line","file","class","type","args");
	echo "<table border=1>";
	echo "<tr>";
	foreach ($cs as $k) echo "<th>$k";
	$r = array_reverse(debug_backtrace());
	foreach ($r as $e) {
		echo "<tr>";
		foreach ($cs as $k) {
			echo "<td>";
			$v = $e[$k];
			if (is_array($v)) print_r($v);
			else echo $v;
			}
		}
	echo "</table>";
	die;
	}

function skin_param($k,$v) { global $_skin; $_skin[$k]=$v; }
function skin_params($p) { global $_skin; foreach ($p as $k=>$v) $_skin[$k]=$v; }
function skin_trail($e) { global $_skin; $_skin["trail"][] = $e; }
?>